package com;

import java.util.HashMap;
import java.util.Map;

/**
 * @Package: com
 * @ClassName: _2024_01_18
 * @Author: wulongkai
 * @CreateTime: 2024/1/18 14:24
 * @Description:
 */
public class _2024_01_18 {
    public static void main(String[] args) {
        Map<String, String> map = new HashMap<>();
        int i = get(5);

    }

    public static int get(int cap) {
        int n = cap - 1;
        n |= n >>> 1;
        n |= n >>> 2;
        n |= n >>> 4;
        n |= n >>> 8;
        n |= n >>> 16;
        return (n < 0) ? 1 : n + 1;

    }
}
